package com.zxl.grocery.core.metadata;

import com.zxl.grocery.core.shiro.ShiroKit;
import org.springframework.stereotype.Component;

/**
 * @Author: Lzx
 * @Description: 字段填充器
 * @Date: Created in 18:38 2018/12/10
 * @Modified By:
 */
@Component
public class GroceryMpFieldHandler extends CustomMetaObjectHandler {

    @Override
    protected Object getUserUniqueId() {
        try {

            return ShiroKit.getUser().getId();

        } catch (Exception e) {

            //如果获取不到当前用户就存空id
            return "";
        }
    }
}

